<!--
 * @Author: SeonHu
 * @Date: 2025-09-28 14:19:04
 * @LastEditors: SeonHu
 * @LastEditTime: 2025-09-29 11:51:38
 * @FilePath: \bg-vben\src\views\dashboard\account\center\Application.vue
 * @Description: 
 * Copyright © 2020-2025 SANQING Corporation, All rights reserved.
-->
<template>
  <List :class="prefixCls">
    <ARow :gutter="16">
      <template v-for="(item, index) in list" :key="index">
        <ACol :span="6">
          <ListItem :key="index">
            <Card :hoverable="true" :class="`${prefixCls}__card`">
              <div :class="`${prefixCls}__card-title`">
                <Icon class="icon" v-if="item.icon" :icon="item.icon" :color="item.color" />
                {{ item.title }}
              </div>
              <div :class="`${prefixCls}__card-num`">
                活跃用户：<span>{{ item.active }}</span> 万
              </div>
              <div :class="`${prefixCls}__card-num`">
                新增用户：<span>{{ item.new }}</span>
              </div>
              <Icon :class="`${prefixCls}__card-download`" v-if="item.download" :icon="item.download" />
            </Card>
          </ListItem>
        </ACol>
      </template>
    </ARow>
  </List>
</template>

<script lang="ts" setup>
  import Icon from '@/components/Icon/Icon.vue';
  import { Card, Col, List, Row } from 'ant-design-vue';

  import { applicationList } from './data';

  const ARow = Row;
  const ACol = Col;
  const ListItem = List.Item;

  const prefixCls = 'account-center-application';
  const list = applicationList;
</script>

<style lang="scss">
  .account-center-application {
    &__card {
      width: 100%;
      margin-bottom: -12px;

      .ant-card-body {
        padding: 16px;
      }

      &-title {
        margin-bottom: 5px;
        font-size: 16px;
        font-weight: 500;

        .icon {
          margin-top: -5px;
          font-size: 22px;
        }
      }

      &-num {
        margin-left: 24px;
        line-height: 36px;
        color: $text-color-secondary;

        span {
          margin-left: 5px;
          font-size: 18px;
        }
      }

      &-download {
        float: right;
        font-size: 20px !important;
        color: $primary-color;
      }
    }
  }
</style>
